package com.leyou.item.inter.pojo;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

/**
 * @数表名称 tb_spu
 * @开发日期 2020-03-05
 */
@Data
@Table(name="tb_spu")
public class Spu implements Serializable {
    
    /** spu id (主健ID) */
    @Id
    @Column(name="id")
    @JsonFormat(shape = JsonFormat.Shape.STRING) //序列化时转为string类型，防止前端精度丢失
    private Long id;

    /** 标题 */
    @Column(name="title")
    private String title;

    /** 子标题 */
    @Column(name="sub_title")
    private String subTitle;

    /** 1级类目id */
    @Column(name="cid1")
    private Long cid1;

    /** 2级类目id */
    @Column(name="cid2")
    private Long cid2;

    /** 3级类目id */
    @Column(name="cid3")
    private Long cid3;

    /** 商品所属品牌id */
    @Column(name="brand_id")
    private Long brandId;

    /** 是否上架，0下架，1上架  (默认值为: 1) */
    @Column(name="saleable")
    private Boolean saleable;

    /** 是否有效，0已删除，1有效  (默认值为: 1) */
    @Column(name="valid")
    private Boolean valid;

    /** 添加时间 */
    @Column(name="create_time")
    private Date createTime;

    /** 最后修改时间 */
    @Column(name="last_update_time")
    private Date lastUpdateTime;

    private static final long serialVersionUID = 1L;
}